package cn.ywang.current.demo;

import java.util.concurrent.CyclicBarrier;

/**
 * @author BeatificWang
 * @date 2019/7/30 22:52
 */
public class CyclicBarrierDemo extends Thread {

	@Override
	public void run() {
		System.out.println("开始分析数据");
	}

	public static void main(String[] args) {
		CyclicBarrier cyclicBarrier = new CyclicBarrier(5, new CyclicBarrierDemo());
		for (int i = 0; i < 10; i++) {
			new DataImportThread("file" + i, cyclicBarrier).start();
		}
	}
}
